﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class admin_LoaiSP_NSX_Custome : System.Web.UI.MasterPage
{
    private DataSet objDS;
    private string loaisp;
    protected void Page_Load(object sender, EventArgs e)
    {
        loaisp = Request.QueryString["loaisp"];
        LoadTenLoaiSanPham(); ;
        LoadNSX();
    }

    public void LoadTenLoaiSanPham()
    {
        LoaiSanPhamBUS objLSP = new LoaiSanPhamBUS(TGDDConfiguration.DbConnectionString);
        try
        {
            objDS = objLSP.SelectTenLoaiSanPham(int.Parse(loaisp));
            repLoaiSanPham.DataSource = objDS.Tables[0];
            repLoaiSanPham.DataBind();
        }
        catch(Exception ex)
        {
            
        }
    }
    public void LoadNSX()
    {
        NhaSanXuatBUS objNSX = new NhaSanXuatBUS(TGDDConfiguration.DbConnectionString);
        try
        {
            objDS = objNSX.SelectNhaSanXuatByLoaiSanPham(int.Parse(loaisp));
            repNhaSanXuat.DataSource = objDS.Tables[0];
            repNhaSanXuat.DataBind();
        }
        catch (Exception ex)
        {

        }
    }
}
